#include <stdlib.h>
#include <nxos.h>

void* malloc( size_t size )
{
    return (void *)NX_MemAlloc(size);
}

void *realloc( void *ptr, size_t new_size )
{
    return (void *)NX_MemReAlloc(ptr, new_size);
}

void* calloc( size_t num, size_t size )
{
    return (void *)NX_MemAlloc(num * size);
}

void free( void* ptr )
{
    NX_MemFree(ptr);
}

void *aligned_alloc( size_t alignment, size_t size )
{
    return (void *)NX_MemAlignedAlloc(alignment, size);
}
